package com.pikaqiu.service;

import com.pikaqiu.common.ServerResponse;
import com.pikaqiu.pojo.User;

/**
 * Created by Administrator on 2018/6/4.
 */
public interface IUserService {
    ServerResponse<User> login(String userName, String password);

    ServerResponse<String> register(User user);

    ServerResponse<String> checkEmail(String email);

    ServerResponse<String> checkUserName(String userName);

    ServerResponse<String> checkVaild(String str, String type);

    ServerResponse selectQuestion(String userName);

    ServerResponse checkAnswer(String userName, String question, String answer);

    ServerResponse forgetRestPassword(String userName, String newPassword, String token);

    ServerResponse restPassword(String passwordOld, String passwordNew, User user);

    ServerResponse<User> updateUserInfo(User user);

    ServerResponse getInformation(Integer id);

    boolean checkUserRole(User user);
}
